package com.annotation.demo5;

/**
 * @ClassName MammalKeeper
 * @Description 哺乳动物饲养员
 * @Author Kx
 * @Date 2025/3/30 16:37
 * @Version 1.0
 */
public class MammalKeeper extends Breeder{
    public String name;
    private Mammal animal;

    public MammalKeeper() {

    }
    public MammalKeeper(String name, Mammal animal) {
        this.name = name;
        this.animal = animal;
    }

    /***
     * @author: kx
     * @date: 2025/3/30 16:14
     * @description: 饲养员的喂养方法
     */
    public void feed(){
        System.out.println(name + "开始喂食");
        // 调用动物的eat方法
        animal.eat();
    }

    /***
     * @author: kx
     * @date: 2025/3/30 16:32
     * @description: 饲养员检查动物随眠情况
     */
    public void patrol(){
        super.patrol();
    }

    /***
     * @author: kx
     * @date: 2025/3/30 16:35
     * @description: 检查动物健康情况
     */
    public void healthCheck(){
        super.healthCheck();
    }
}
